package com.blackcat.v2.demo;

public interface MyLifecycle {


    public static final String BEFORE_START = "before_start";

    public static final String AFTER_START = "after_start";

    public static final String BEFORE_STOP = "before_stop";

    public static final String AFTER_STOP = "afater_stop";

    /**
     * 添加一个监听器
     * @param listener
     */
    void addLifecycleListener(MyLifecycleListener listener);

    /**
     * 获取所有的监听器
     * @return
     */
    MyLifecycleListener[] getLifecycleEvents();

    /**
     * 启动
     */
    void start();

    /**
     * 停止
     */
    void stop();



}
